//3. Object.freeze
const obj = {
  prop1: 11,
};

Object.freeze(obj);

// 添加
obj.prop2 = "prop2";
// 修改值
obj.prop1 = 33;
// 删除
delete obj.prop1;

Object.defineProperty(obj, "prop1", {
  value: 10,
});

console.log(obj.prop1);
console.log(obj.prop2);
console.log(Object.isFrozen(obj));
